package com.whz.eq;

import java.awt.*;

/**
 * @ClassName PointMainTest
 * @Description TODO
 * @Author hong-zhi
 * @Date 2021/5/3 14:11
 * @Version 1.0
 */
public class PointMainTest {
    public static void main(String[] args) {
        Point point = new Point(1, 1);
        ColorPoint colorPoint1 = new ColorPoint(1,1, Color.red);
        ColorPoint colorPoint2 = new ColorPoint(1,1, Color.blue);

        SmellPoint smellPoint = new SmellPoint(1, 1, "Sweet");

        /*
        * x.equals(y) == true x.equals(z) == true 根据传递性 y.equals(z) == true
        * */
//        System.out.println(point.equals(colorPoint1));
//        System.out.println(point.equals(colorPoint2));
        System.out.println(colorPoint1.equals(smellPoint));

    }
}
